<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "Types".
 *
 * @property int $id
 * @property string $name
 * @property string $des
 * @property int $type
 */
class Types extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'Types';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['type'], 'integer'],
            [['name', 'des'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id'   => 'ID',
            'name' => '名称',
            'des'  => '描述',
            'type' => '类别',
        ];
    }
}
